* fileio.c (Fmake_symbolic_link): If a file already exists under
authorJim Blandy <jimb@redhat.com>
Tue, 4 May 1993 02:29:57 +0000 (02:29 +0000)
committerJim Blandy <jimb@redhat.com>
Tue, 4 May 1993 02:29:57 +0000 (02:29 +0000)
the link's filename, delete the file which the link
would replace, not the file the link would point at.

src/fileio.c

index 563726d1265132e7851c1f7d1f3d1981e2725c18..7927a52d1b161b730a22c5ccb76f8e3624e00acb 100644 (file)
@@ -1864,7 +1864,7 @@ This happens for interactive use with M-x.")
       /* If we didn't complain already, silently delete existing file.  */
       if (errno == EEXIST)
        {
-         unlink (XSTRING (filename)->data);
+         unlink (XSTRING (linkname)->data);
          if (0 <= symlink (XSTRING (filename)->data, XSTRING (linkname)->data))
            return Qnil;
        }